@isTest(seealldata=false)
private class HF_SearchTestClasses {
   
static testmethod void testSearch(){
     test.startTest();
         PIMS_Reserved_Id__c pimsid=new PIMS_Reserved_Id__c();
         pimsid.PIMS_Id__c='0000-0000';
         pimsid.Used__c=false;
         insert pimsid;
         
         PIMS_Reserved_Id__c pimsid1=new PIMS_Reserved_Id__c();
         pimsid1.PIMS_Id__c='0001-0000';
         pimsid1.Used__c=false;
         insert pimsid1;
         
         Account acc=new Account();
         acc.Name='test';
         acc.Type='SSO';
         insert acc;
         
         Contact con=new Contact();
         con.LastName='Test';
         con.AccountId=acc.id;
         con.Status__c='Active';
         con.firstname='sandhya';
         insert con;
         
         Contact_Address__c contactaddress=new Contact_Address__c();
         contactaddress.Contact__c=con.id;
         contactaddress.Address_Type__c='Home';
         contactaddress.Country__c='Canada (CA)';
         contactaddress.State__c='Test (TT)';
         contactaddress.Preferred__c=true;
         contactaddress.city__c='tt';
         contactaddress.Zipcode__c='788';
         insert contactaddress;
         
         Contact_Email__c contactemail=new Contact_Email__c();
         contactemail.Contact__c=con.id;
         contactemail.Email_Type__c='Email at Home';
         contactemail.Email__c='Test@a.com';
         contactemail.Preferred__c=true;
         insert contactemail;
         
         Contact_Phone__c conphone1=new Contact_Phone__c();
         conphone1.Contact__c=con.id;
         conphone1.Country__c='Canada (CA)';
         conphone1.Phone__c='12345';
         conphone1.Phone_Type__c='home';
         conphone1.Preferred__c=false;
         insert conphone1;
        
       ApexPages.StandardController sc=new ApexPages.StandardController(con);
       HF_SearchController searchcontroller=new HF_SearchController(sc);
        WebServiceFinal2.ArrayOfSearchContactWrapper arrayofSearchcontactWrapper = new WebServiceFinal2.ArrayOfSearchContactWrapper();
       
        searchcontroller.firstname='sandhya';
        searchcontroller.lastname ='test';
        searchcontroller.email='Test@a.com';
        searchcontroller.phone='12345';
        searchcontroller.state='Test (TT)';
        searchcontroller.zipcode='6474';
        searchcontroller.city='tt';
        searchcontroller.streetaddress='test7';
        searchcontroller.country='Canada (CA)';
        
        searchcontroller.searchContact();
        HF_ClientWSSearch pimsCall=new HF_ClientWSSearch();
        List<WebServiceFinal2.SearchContactWrapper> searchresults=new List<WebServiceFinal2.SearchContactWrapper>();        
        
        searchresults = pimsCall.Searchcontactinpims('test1','test2','test3','test4','test5','test6','test7','test8','test9');
        
     
        WebServiceFinal2.SearchContactWrapper searchresult=new WebServiceFinal2.SearchContactWrapper();
        
        searchresult.City = 'tt';
        searchresult.Country = 'test8 (ty)';
        searchresult.Email = 'test3';
        searchresult.FirstName='test1';
        searchresult.LastName ='test2';
        searchresult.NameID=1;
        searchresult.PartnerID='5757-4848';
        searchresult.Phone='test4';
        searchresult.State='test5 (tt)';
        searchresult.StreetAddress='test7';
        searchresult.ZipCode='test6';
        //searchresults.add(searchresult);
        
      searchresults= arrayofSearchcontactWrapper.SearchContactWrapper;    
         
        HF_wrapperClass.SearchWrapper searchwrapper=new HF_wrapperClass.SearchWrapper();
        List<HF_wrapperClass.SearchWrapper> searchwrapper2=new List<HF_wrapperClass.SearchWrapper>();
        
                                    searchwrapper.email='san@c.com';
                                    searchwrapper.firstname='sandhya';
                                    searchwrapper.lastname='test';
                                    searchwrapper.nameID='1';
                                    searchwrapper.partnerID='6474-4848';
                                    searchwrapper.phone='5745845';
                                    searchwrapper.state='test5 (tt)';
                                    searchwrapper.city='city1';
                                    searchwrapper.StreetAddress='address1';
                                    searchwrapper.zipCode='6576';
                                    searchwrapper.contactid=con.Id;
                                    searchwrapper.isview=true;
                                    searchwrapper.isimport=false;
                                    searchwrapper2.add(searchwrapper);
                          
                                        
        
       /* WebServiceFinal2.SearchContactWrapper searchContactwrapper = new WebServiceFinal2.SearchContactWrapper();
        WebServiceFinal2.ArrayOfSearchContactWrapper arrayofSearchcontactWrapper = new WebServiceFinal2.ArrayOfSearchContactWrapper();
        
        List<WebServiceFinal2.SearchContactWrapper> searchContactWrapperResult = new List<WebServiceFinal2.SearchContactWrapper>();
   
                
              HF_ClientWSSearch pimsCall=new HF_ClientWSSearch();
             List<WebServiceFinal2.SearchContactWrapper> searchresults=new List<WebServiceFinal2.SearchContactWrapper>();
              PageReference pageRef = ApexPages.currentPage();
              pageRef= null;
             
              searchresults = pimsCall.Searchcontactinpims('test1','test2','test3','test4','test5','test6','test7','test8','test9');
                 searchContactwrapper.City ='test1';
                 searchContactwrapper.Country ='test2';
                 searchContactwrapper.Email = 'test3';
                 searchContactwrapper.FirstName = 'test4';
                 searchContactwrapper.LastName = 'test5';
                 searchContactwrapper.Phone = 'test6';
                 searchContactwrapper.State = 'test7';
                 searchContactwrapper.StreetAddress = 'test8';
                 searchContactwrapper.ZipCode = 'test9';
                 
                  arrayofSearchcontactWrapper = pimsCall.SearchContact(searchContactwrapper);
                  searchContactWrapperResult = arrayofSearchcontactWrapper.SearchContactWrapper;
                  
                  
              pageRef = searchcontroller.searchContact();  */      
     test.stopTest();
}


}